"""存放前置用例"""
import pytest

from common.yaml_util import YamlUtil


@pytest.fixture(scope="function")
def db_connect():
    """db connect"""
    print("数据库连接")
    yield
    print("数据库关闭")


@pytest.fixture(scope="function", autouse=True)
def login():
    """db connect"""
    print("登录操作")


@pytest.fixture(scope="session", autouse=True)
def clear_yml():
    print("清除文件操作")
    YamlUtil().clear_yaml_file()
